package com.lvtu.monitor.mongo.service;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.lvtu.monitor.dao.base.BaseDaoTemplate;

/** 
 * @Title: MongoServiceImpl.java 
 * @Package com.lvtu.monitor.mongo.service 
 * @Description: TODO 
 * @author dengcheng 
 * @date 2015-5-25 下午5:48:41 
 * @version V1.0.0 
 */
@Repository
public class MongoServiceImpl implements IBaseMongoService {

	@Autowired
	BaseDaoTemplate dao;
	
	@Override
	public void insert(Object obj) {
		// TODO Auto-generated method stub
		dao.insert(obj);
	}

	@Override
	public <T> T findOne(String id, Class<T> clazz) {
		// TODO Auto-generated method stub
		return dao.findOne(id, clazz);
	}

	@Override
	public <T> List<T> findAll(Class<T> clazz) {
		// TODO Auto-generated method stub
		return dao.findAll(clazz);
	}

	@Override
	public <T> void removeOne(String id, Class<T> clazz) {
		// TODO Auto-generated method stub
		dao.removeOne(id, clazz);
	}

	@Override
	public <T>void batchInsert(
			List<Class<T>> list,
			Class<T> clazz) {
			dao.batchInsert(list, clazz);
	}

	@Override
	public <T> void updateOne(String id, Map<String, Object> update, Class<T> clazz) {
		dao.updateOne(id, update, clazz);
	}
	

}
